package org.android10.viewgroupperformance.Dagger;

import dagger.Lazy;

import javax.inject.Inject;

/**
 * Created by Bruce-Home on 2015/8/29.
 */
public class CoffeeMaker {
    private final Lazy<Heater> heater;
    private final Pump pump;

    @Inject
    public CoffeeMaker(Lazy<Heater> heater, Pump pump) {
        this.heater = heater;
        this.pump = pump;
    }

    public void brew() {
        heater.get().on();
        pump.bump();
        System.out.println( " [_]P coffee! [_]P ");
        heater.get().off();
    }
}
